package 序列化;

import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Filewriter方法 {
    public static void main(String[] args){
        File file =new File("e:\\uu.txt");
        try {
            FileWriter fw=new FileWriter(file);
            String s="啦啦啦啦啦啦啦啦";
            fw.write(s);
            fw.close();
            FileReader fr=new FileReader(file);
            int c=fr.read();
            while (c!=-1){
                System.out.print((char) c);
                c=fr.read();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
